﻿using SkiaSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutojsController.Helpers
{
    public class IPAddressCompareException: Exception
    {
        public IPAddressCompareException() : base() { }
        public IPAddressCompareException(string message) : base(message) { }
    }

    public class MobileConnectException: Exception
    {
        public MobileConnectException(string message) : base(message) { }
    }

    public class MobileCountLimitExceededException: Exception {
        public MobileCountLimitExceededException(string message) : base(message) { }
    }

    public class ScriptCountLimitExceededException: Exception {
        public ScriptCountLimitExceededException(string message) : base(message) { }
    }

    public class GroupCountLimitExceededException : Exception
    {
        public GroupCountLimitExceededException(string message) : base(message) { }
    }

    public class UnkownSocketMessageTypeException : Exception
    {
        public UnkownSocketMessageTypeException() : base("未知的Socket消息类型") { }
    }

    public class DeleteMobileForbiddenException : Exception
    {
        public DeleteMobileForbiddenException(string reason): base(reason) { }
    }

    public class DuplicateMobileException:Exception
    {
        public DuplicateMobileException() : base("该IP的设备已存在") { }
    }

    public class DuplicateGroupException:Exception
    {
        public DuplicateGroupException(string grpName) : base($"已存在该分组:{grpName}") { }
    }

    public class DuplicateScriptException : Exception
    {
        public DuplicateScriptException(string srpName) : base($"已存在名称为{srpName}的脚本") { }
    }
}
